package com.itheima.servlet;

import com.itheima.domain.Role;
import com.itheima.mapper.RoleMapper;
import com.itheima.utils.MapperUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class RoleDemo {
    public static void main(String[] args) {
        SqlSession session = MapperUtils.getSqlSession();
        RoleMapper mapper = session.getMapper(RoleMapper.class);
        List<Role> list = mapper.findAll();
        for (Role role : list) {
            System.out.println(role);
        }
        MapperUtils.close(session);
    }
}
